<div class="grid_7">
    <div class="box">
        <h2>
            <a href="#" id="toggle-tables">CAR VERSION MANAGEMENT : <?= $this->management_model->get_model('CAR', $model_id)->model; ?></a>
        </h2>
        <div class="block" >
            <form name="admin-form" action="<?= base_url(); ?>admin/management/version_insert" method="post">
                <fieldset>
                    <legend>VERSION : NEW </legend>
                    <?php
                    if ($this->session->flashdata('message')) {
                        $msg = $this->session->flashdata('message');
                        echo '<font color="red">' . $msg . '</font>';
                    }
                    ?> 
                    <div class="field">
                        <label> Version Name</label>
                        <input type="text" size="50" name="version" onfocus="if(this.value=='Enter Version')this.value='';" 
                               onblur="if(this.value=='')this.value='Enter Version';" value="Enter Version"/>
                        <input type="hidden" name="model_id" value="<?= $model_id; ?>"/>
                        <input type="hidden" name="company_id" value="<?= $make_id; ?>"/>
                        <input type="submit" value="Add Version" name="insert"/>
                    </div>
                </fieldset>
            </form>
        </div>
    </div> <!-- END OF BOX -->

    <div class="box">
        <h2>
            <a href="#" id="toggle-tables">VERSION LIST : <?= $this->management_model->get_model('CAR', $model_id)->model; ?></a>
        </h2>
        <div class="block" >
            <fieldset>
                <legend>List :</legend>
                <?php foreach ($version as $version): ?>

                    <div class="field">
                        <form name="update_make" action="<?= base_url(); ?>admin/management/version_update" method="post"> 
                            <input type="hidden" size="0" name="version_id" value="<?= $version->id; ?>" />
                            <input type="hidden" size="0" name="model_id" value="<?= $version->model_id; ?>" />
                            <input type="hidden" size="0" name="make_id" value="<?= $version->make_id; ?>" />
                            <input type="text" size="50" name="version_detail" value="<?= $version->version; ?>" />
                            <input type="submit" value="Update" name="version_update" />
                            <div id="link-button" style="float: right">
                                <a href="<?= base_url(); ?>admin/management/version_price_description/<?= $version->make_id; ?>/<?= $version->model_id; ?>/<?= $version->id; ?>" class="link-button"> Price and Description </a>
                                <a href="<?= base_url(); ?>admin/management/version_image_uplaod/<?= $version->make_id; ?>/<?= $version->model_id; ?>/<?= $version->id; ?>" class="link-button"> Image </a>
                                <a href="<?= base_url(); ?>admin/management/version_feature/<?= $version->make_id; ?>/<?= $version->model_id; ?>/<?= $version->id; ?>" class="link-button"> Features </a>
                                <a href="<?= base_url(); ?>admin/management/version_specification/<?= $version->make_id; ?>/<?= $version->model_id; ?>/<?= $version->id; ?>" class="link-button"> Specification </a>
                                <a href="<?= base_url(); ?>admin/management/version_delete/<?= $version->make_id; ?>/<?= $version->model_id; ?>/<?= $version->id; ?>" class="link-button"  onclick="return confirm('Are you sure you ...')"> Delete </a>
                            </div>
                        </form>
                    </div>
                <?php endforeach; ?>
            </fieldset>
        </div>
        <div class="pagination" align="left"> <?php echo $this->pagination->create_links(); ?>  </div>
    </div> <!-- END OF BOX -->


</div>